case statement - définition. Qu'est-ce que case statement
Diclib.com
Dictionnaire ChatGPT
Entrez un mot ou une phrase dans n'importe quelle langue 👆
Langue:

Traduction et analyse de mots par intelligence artificielle ChatGPT

Sur cette page, vous pouvez obtenir une analyse détaillée d'un mot ou d'une phrase, réalisée à l'aide de la meilleure technologie d'intelligence artificielle à ce jour:

  • comment le mot est utilisé
  • fréquence d'utilisation
  • il est utilisé plus souvent dans le discours oral ou écrit
  • options de traduction de mots
  • exemples d'utilisation (plusieurs phrases avec traduction)
  • étymologie

Qu'est-ce (qui) est case statement - définition

SELECTION CONTROL MECHANISM IN PROGRAMMING LANGUAGES
Case statement; Switch case; Switch-case; Select case; Select statement; Inspect statement; Decode (Oracle); Fallthrough switch; Switch (programming); Fallthrough

case statement         
Switch statement         
In computer programming languages, a switch statement is a type of selection control mechanism used to allow the value of a variable or expression to change the control flow of program execution via search and map.
switch statement         
<programming> (Or case statement, multi-way branch) A construct found in most high-level languages for selecting one of several possible blocks of code or branch destinations depending on the value of an expression. An example in C is switch (foo(x, y)) { case 1: printf("Hello "); /* fall through */ case 2: printf("Goodbye "); break; case 3: printf("Fish "); break; default: fprintf(stderr, "Odd foo value "); exit(1); } The break statements cause execution to continue after the whole switch statemetnt. The lack of a break statement after the first case means that execution will fall through into the second case. Since this is a common programming error you should add a comment if it is intentional. If none of the explicit cases matches the expression value then the (optional) default case is taken. A similar construct in some functional languages returns the value of one of several expressions selected according to the value of the first expression. A distant relation to the modern switch statement is Fortran's computed goto. (1997-01-30)

Wikipédia

Switch statement

In computer programming languages, a switch statement is a type of selection control mechanism used to allow the value of a variable or expression to change the control flow of program execution via search and map.

Switch statements function somewhat similarly to the if statement used in programming languages like C/C++, C#, Visual Basic .NET, Java and exists in most high-level imperative programming languages such as Pascal, Ada, C/C++, C#, Visual Basic .NET, Java, and in many other types of language, using such keywords as switch, case, select or inspect.

Switch statements come in two main variants: a structured switch, as in Pascal, which takes exactly one branch, and an unstructured switch, as in C, which functions as a type of goto. The main reasons for using a switch include improving clarity, by reducing otherwise repetitive coding, and (if the heuristics permit) also offering the potential for faster execution through easier compiler optimization in many cases.

Exemples du corpus de texte pour case statement
1. "You have been trying to convince him what to write in his defence case statement," said the QC.
2. Judge John Rogers QC gave a time table for when prosecution papers and the defence case statement should be served.
3. He said he dismembered the bodies, burned them in the fireplace, then used a hammer to crush the bones, according to the probable case statement.